<?php
class update_db_version_1 extends Update_Model_Database_AbstractChange{

	protected $comment="Создание таблицы update_db_version";

	public function up(){
		$sql='CREATE TABLE IF NOT EXISTS update_db_version(
  					table_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  					version INT(11) DEFAULT NULL,
  					update_date DATETIME NOT NULL,
  					PRIMARY KEY (table_name)
				)
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);
	}

	public function down(){
		$sql='DROP TABLE IF EXISTS update_db_version ;';
		$this->db->query($sql);
	}

}